import 'package:dio/dio.dart';

class QuestionList{
  static List commentOnList;
  static getCommentsOnComment(String token,int id) async {
    var response1=await Dio().post(
      'http://121.196.101.7:8080/treehole/comment/commentsOnComment',
      queryParameters: {'commentId': id},
      options: Options(headers: {'Token': token}),
    );
    print (response1.data);
    var response2=new Map<String, dynamic>.from(response1.data);
    commentOnList=[];//每次调用让list为空，使用dispose？
    commentOnList = response2["data"];
    return commentOnList;
  }
}